<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>水平居中</title>
    <style>
        a {
            display: block;
            margin-left: auto;
            margin-right: auto;
            text-align: center;
            width: 800px;
            height: 80px;
            background: pink;


        }
    </style>
</head>

<body>
    <a href="#">a </a>

</body>

</html>